<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>处理过程</title>
    <link rel="stylesheet" href="../../lib/layui/css/layui.css">
</head>

<style>
    .processEnclosure{
        margin-top: 10px;
    }
    .layui-timeline-item{
        padding-bottom: 40px;
    }
</style>

<body>
<div style="background-color:#3399ff;border-bottom:5px solid #ffcc00;height: 30px;line-height:30px;padding-left:10px;font-size: 16px;">
    <p style="color: #ffffff;">处理过程(共<span id="processCount">0</span>条)</p>

</div>

<div style="background-color:#fdfdfd;margin-top: 10px;padding-top: 20px;">
    <ul class="layui-timeline" id="timeline">
    </ul>
    <div style="height: 50px;"></div>
</div>

</body>

<script src="../../lib/layui/layui.js"></script>
<script src="../../js/jquery.min.js"></script>
<script src="../../js/application.js"></script>

<script>
    $("#processCount").text("2")
    setTimeLineStartByOne();
    setTimeLineStart();

    function setTimeLineStart(){
        var depName="阜外医院"
        var time="2021-06-30"
        var userName="管理员1"
        var docUserName="协作医生1"
        var top="<li class=\"layui-timeline-item\">\n" +
            "            <i class=\"layui-icon layui-bg-blue layui-timeline-axis\">&#xe63f;</i>\n" +
            "            <div class=\"layui-timeline-content layui-text\">";
        var botton="</div>\n" +
            "        </li>\n" +
            "        <hr style='border: 1px dashed #4db0fd;height: 1px;margin: 0 15px 20px 10px'>";
        var content=" <h3 class=\"layui-timeline-title\"><span>"+depName+"</span>" +
            "<span style=\"margin-left: 10px\">"+time+"</span>" +
            "<span style=\"margin-left: 10px\">"+userName+"</span></h3>\n" +
            "                <p>" +
            "由"+userName+"分配给"+docUserName
            +"                </p>"
        $("#timeline").append(top+content+botton);
        returnData();
    }

    function setTimeLineStartByOne(){
        var depName="医院1"
        var time="2021-06-29"
        var userName="普通医生1"
        var top="<li class=\"layui-timeline-item\">\n" +
            "            <i class=\"layui-icon layui-bg-blue layui-timeline-axis\">&#xe63f;</i>\n" +
            "            <div class=\"layui-timeline-content layui-text\">";
        var botton="</div>\n" +
            "        </li>\n" +
            "        <hr style='border: 1px dashed #4db0fd;height: 1px;margin: 0 15px 20px 10px'>";
        var content=" <h3 class=\"layui-timeline-title\"><span>"+depName+"</span>" +
            "<span style=\"margin-left: 10px\">"+time+"</span>" +
            "<span style=\"margin-left: 10px\">"+userName+"</span></h3>\n" +
            "                <p>" +
            userName+"创建诊断记录"
            +"                </p>"
        $("#timeline").append(top+content+botton);
    }


    function returnData(inputData){
        var data={
            "height":$("#timeline").height()+150
        }
        $(window.parent.processReturnData(data));
    }

    layui.use(['layedit', 'upload', 'form'], function () {
        var layedit = layui.layedit;
        var upload = layui.upload;
        var form = layui.form;

    });



</script>

</html>